package com.gxa.controller;

import com.gxa.common.LayR;
import com.gxa.param.MyTableParam;
import com.gxa.service.orderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("order")
public class orderController {

    @Autowired
    private orderService service;

    @GetMapping("/list/page")
    public String listPage(){
        return "/order/order_form";
    }

    @PostMapping("/list/Pagedata")
    @ResponseBody
    public LayR list1(MyTableParam param){
        return service.list(param);
    }

    @GetMapping("/select/page")
    public String selectPage(){
        return "/order/order_select";
    }

    @PostMapping("/select/Pagedata")
    @ResponseBody
    public LayR list2(MyTableParam param){
        return service.list2(param);
    }
}
